package com.examples.startanactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class SecondActivity extends Activity{

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.second);
		
		TextView textView = (TextView) findViewById(R.id.textView);
		
		// Get the intent that started this Activity
		Intent intent = getIntent();
		textView.setText(intent.getStringExtra("SomeExtraData"));
		
		intent.putExtra("SomeExtraValue", "Welcome back from the second activity");
		setResult(RESULT_OK, intent);
	}
}
